<%-- 
    Document   : test
    Created on : 28 ก.ย. 2554, 10:28:27
    Author     : Tailer
--%>

<%@page import="org.jsrpc.bridge.Key"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/jsrpc.tld" prefix="jsrpc"%>
<%@taglib uri="/WEB-INF/workforce.tld" prefix="work"%>
<!DOCTYPE html>

<jsrpc:broker>
    <jsrpc:register id="service" bean="workforce.limousine.service.TransportTariffManager"/>
</jsrpc:broker>
<html>
    <script language="JavaScript" type="text/javascript" src="js/transportTariff.js"></script>
    <script language="JavaScript" type="text/javascript" src="js/ui.js"></script>    
    <script language="JavaScript" type="text/javascript" src="js/JTable.js"></script>
    <script language="JavaScript" type="text/javascript" src="js/table.js"></script>
    <script language="JavaScript" type="text/javascript" src="js/validation.js"></script>
    <script language="JavaScript" type="text/javascript" src="js/util.js"></script>
<jsrpc:script base="<%=request.getServletPath()%>"/>
<script language="JavaScript" type="text/javascript">
    <!--
    function initPage() {
    <%
        //String s = this.
        String s = request.getServletPath();
        System.out.println("login.jsp[" + s + "]");
        String sp[] = s.split("/");
        System.out.println("size:" + sp.length);
        StringBuffer sf = new StringBuffer();
        for (int i = 2; i < sp.length; i++) {
            //System.out.println("["+ sp[i]+"]");
            sf.append("../");
        }
           String pageId = (String) pageContext.getAttribute(Key.PAGE_ID);
            session.setAttribute("BACK_PATH." + pageId, sf.toString());
            sf.append("BROKER-REGISTER?pageId=").append(pageId);
            System.out.println("path[" + sf.toString() + "]");
        %>
                initBroker("<%=sf.toString()%>");
                var search = document.getElementById("formSearch");
                search.style.visibility = "visible";
                var panel = document.getElementById("panel");
                search.style.top = panel.style.top;
                search.style.left = panel.style.left;
            }
        -->
</script>
</head>
<body onload="initPage()">
        <h1>Hello World!</h1>
    </body>
</html>
